<style>
li img{max-width:160px; height:90px;}
.layui-input-block .layui-table td{border: none}
</style>

<input type="hidden" name="doc.id" value="#(doc.id)">

<div class="layui-form-item">
	<div class="layui-inline">
		<label class="layui-form-label layui-bg-blue">状态</label>
		<div class="layui-input-inline">
			<input type="radio" name="doc.status" value="on" title="启用" #if(doc.status == 'on' || doc.status == null) checked #end>
			<input type="radio" name="doc.status" value="off" title="禁用" #if(doc.status == 'off') checked #end>
		</div>
	</div>
	<div class="layui-inline">
		<label class="layui-form-label layui-bg-blue">排序号：</label>
		<div class="layui-input-inline">
			<input type="text" name="doc.sortNum" lay-verify="required" autocomplete="off" class="layui-input" value="#(doc.sortNum)">
		</div>
	</div>
</div>

<div class="layui-form-item">
	<div class="layui-inline">
		<label class="layui-form-label layui-bg-blue">标题</label>
		<div class="layui-input-inline">
			<input type="text" name="doc.title" lay-verify="required|title" placeholder="请输入标题" autocomplete="off" class="layui-input" value="#(doc.title)">
		</div>
	</div>
</div>

<div class="layui-form-item">
	<label class="layui-form-label">子标题</label>
	<div class="layui-input-block">
		<input type="text" name="doc.subtitle" placeholder="" class="layui-input" value="#(doc.subtitle)">
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">标签</label>
	<div class="layui-input-block">
		<select name="doc.tags" xm-select="doc_tags_selects">
	#tagList()
		#for(tag : tagList)
			<option value="#(tag.name)" #if(doc.tagList.contains(tag.name))selected#end>#(tag.name)</option>
		#end
	#end
		</select>
	</div>
</div>
<div class="layui-form-item">
	<div class="layui-inline">
		<label class="layui-form-label layui-bg-blue">原始点击数</label>
		<div class="layui-input-inline">
			<input type="text" name="doc.baseHits" lay-verify="required|number" autocomplete="off" class="layui-input" value="#(doc.baseHits)">
		</div>
	</div>
	<div class="layui-inline">
		<label class="layui-form-label">点击数</label>
		<div class="layui-input-inline">
			<input type="text" name="doc.hits" disabled lay-verify="required|number" autocomplete="off" class="layui-input layui-disabled" value="#(doc.hits)">
		</div>
	</div>
</div>

<div class="layui-form-item">
	<div class="layui-inline">
		<label class="layui-form-label layui-bg-blue">分类</label>
		<div class="layui-input-inline">
			<select name="doc.categoryId">
				<option value="">-- 请选择 --</option>
				#for(docCategory : docCategoryList)
				<option value="#(docCategory.id)" #if(doc.categoryId == docCategory.id) selected #end>#(docCategory.name)</option>
				#end
			</select>
		</div>
	</div>
</div>
<div class="layui-form-item">
	<label class="layui-form-label">关键字</label>
	<div class="layui-input-block">
		<input type="text" name="doc.keywords" placeholder="关键字用英文逗号隔开" class="layui-input" value="#(doc.keywords)">
	</div>
</div>
<div class="layui-form-item layui-form-text">
	<label class="layui-form-label">描述</label>
	<div class="layui-input-block">
		<textarea placeholder="" name="doc.remark" class="layui-textarea">#(doc.remark)</textarea>
	</div>
</div>

<div class="layui-tab layui-tab-brief">
	<ul class="layui-tab-title">
		<li class="layui-this"><i class="layui-icon layui-icon-website"></i>  桌面端</li>
		<li><i class="layui-icon layui-icon-cellphone"></i>  移动端</li>
	</ul>
	<div class="layui-tab-content">
		<div class="layui-tab-item layui-show">
			<div class="layui-form-item">
				<label class="layui-form-label">封面图</label>
				<div class="layui-input-block">
					<ul>
						<li class="hide_in_view">
							<table class="layui-table">
								<tr>
									<td width="10px">
										<input type="hidden" id="ID_img_url" name="doc.img" value="#(doc.img)">
										<button type="button" class="layui-btn jfsa-select-image" id="ID_img_upload" jfsa-input="ID_img_url" jfsa-img="ID_img">设置</button>
									</td>
									<td>
										<div class="layui-form-mid layui-word-aux"></div>
									</td>
								</tr>
							</table>
						</li>
						<li style="height: 90px">
							<img onclick="Jfsa.reviewImage(this);" src="#(doc.img)" id="ID_img">
						</li>
					</ul>
				</div>
			</div>

			<textarea id="ID_doc_content">#(doc.content)</textarea>
			<textarea id="ID_doc_content_input" name="doc.content" style="display: none;">#(doc.content)</textarea>
		</div>

		<div class="layui-tab-item">
			<blockquote class="layui-elem-quote">内容为空时采用桌面端内容</blockquote>

			<div class="layui-form-item">
				<label class="layui-form-label">封面图（移动端）</label>
				<div class="layui-input-block">
					<ul>
						<li class="hide_in_view">
							<table class="layui-table">
								<tr>
									<td width="10px">
										<input type="hidden" id="ID_img_h5_url" name="doc.imgH5" value="#(doc.imgH5)">
										<button type="button" class="layui-btn jfsa-select-image" id="ID_img_h5_upload" jfsa-input="ID_img_h5_url" jfsa-img="ID_img_h5">设置</button>
									</td>
									<td>
										<div class="layui-form-mid layui-word-aux"></div>
									</td>
								</tr>
							</table>
						</li>
						<li style="height: 90px">
							<img onclick="Jfsa.reviewImage(this);" src="#(doc.imgH5)" id="ID_img_h5">
						</li>
					</ul>
				</div>
			</div>

			<textarea id="ID_doc_content_h5">#(doc.contentH5)</textarea>
			<textarea id="ID_doc_content_h5_input" name="doc.contentH5" style="display: none;">#(doc.contentH5)</textarea>
		</div>
	</div>
</div>

<fieldset class="layui-elem-field" style="padding: 10px">
	<legend>SEO设置</legend>
	<blockquote class="layui-elem-quote">内容为空时采用全局设置</blockquote>
	<div class="layui-form-item">
		<div class="layui-inline">
			<label class="layui-form-label">标题</label>
			<div class="layui-input-inline">
				<input type="text" name="doc.seoTitle" placeholder="请输入SEO关键词" class="layui-input" value="#(doc.seoTitle)">
			</div>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">关键词</label>
		<div class="layui-input-block">
			<input type="text" name="doc.seoMetaKeywords" placeholder="用英文逗号隔开各关键词" class="layui-input" value="#(doc.seoMetaKeywords)">
		</div>
	</div>
	<div class="layui-form-item layui-form-text">
		<label class="layui-form-label">描述</label>
		<div class="layui-input-block">
			<textarea name="doc.seoMetaDescription" placeholder="请输入SEO描述" class="layui-textarea">#(doc.seoMetaDescription)</textarea>
		</div>
	</div>
</fieldset>
